With the object of enhancing the execution performance of a computer program and analyzing the performance characteristics, a performance profile of the computer program is obtained. The performance profile includes, for example, the execution frequency of the functions processed during the execution of the computer program. If the functions having a high execution frequency are enhanced in performance, then it becomes possible to enhance the functions of the entire computer program.
One of the methods for obtaining the execution frequency includes sampling the values of the instruction counter of a central processing unit (CPU), that is, sampling the execution addresses at regular intervals; storing the sampled execution addresses; determining the functions corresponding to the addresses stored after the completion of execution of the computer program; and calculating the function-by-function appearance count as the execution count. The appearance count represents the frequency of the functions that are executed at the timings sampled at regular intervals, and is different than the count of actual execution of the functions. However, the functions that are repeatedly executed have a longer execution period and a higher appearance count.
The execution frequency of a function is often analyzed based on the calling relationships of the function. As an example, if a function C has the execution frequency of 100 times, the analysis indicates that the function C is called in order of function A→function B→function C for 80 times and is called in order of function X→function Y→function Z→function C for 20 times.
Meanwhile, a conventional technology is known in which a profile information acquisition target such as a method is specified; whether or not the specified profile information acquisition target is running is monitored; and profile information is obtained when the specified profile information acquisition target is running. That enables achieving reduction in the overhead for obtaining the profile information.
a conventional technology is known in which function calling in a source program is detected and identification numbers are assigned according to the types of call pairs; and a table area is set for storing the function calling count for each identification number. That enables achieving reduction in the memory area and the overhead during profile processing.
Furthermore, a conventional technology is known in which, in a source program, an operation is inserted for setting an area for a table used to store the calling count for each dynamic call pair representing a combination of a dynamic calling-side function and a dynamic called-side function. That enables achieving reduction in the amount of calculation and the amount of memory at the time of collecting call pair information.
[Patent Literature 1] Japanese Laid-open Patent Publication No. 2005-141392
[Patent Literature 2] Japanese Laid-open Patent Publication No. 11-212837
[Patent Literature 3] Japanese Laid-open Patent Publication No. 2006-202134
In the case of analyzing the execution frequency of a function based on the calling relationships of the function; function calling relationship information also needs to be stored in the memory, which leads to an increase in the volume of profile information stored in the memory. As the volume of profile information stored in the memory increases, it may affect the execution performance of the computer program that is the target for collecting profile information.